package main

import (
	"encoding/json"
	"fmt"
)

type Student struct{
	Name string `json:"student_name"`
	Age int
	Score int
}

func main()  {
	var stu = Student{
		Name:"stu01",
		Age:18,
		Score:80,
	}

	data,err := json.Marshal(stu)
	if err !=nil{
		fmt.Println("json encode stu failed:",err)
		return
	}
	fmt.Println(string(data))
}
